﻿//-----------------------------------------------------------------------
// <copyright file="AboutForm.cs" company="MSCRMTools">
//     Copyright © MSCRMTools. All rights reserved.
// </copyright>
// <authorSTE_ALSY\tanguy.touzard</author>
// <date>23/09/2011</date>
// <codeplexurl>http://roleupdater.codeplex.com</codeplexurl>
// <summary>no summary</summary>
//-----------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Windows.Forms;

namespace RoleUpdater
{
    /// <summary>
    /// Displays information about this program
    /// </summary>
    public partial class AboutForm : Form
    {
        #region Constructor

        /// <summary>
        /// Initializes a new instance of class AboutForm
        /// </summary>
        public AboutForm()
        {
            InitializeComponent();

            // Display version number
            this.lblVersion.Text = "Version: " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); 
        }

        #endregion

        #region Handlers

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                Process.Start("http://roleupdater.codeplex.com/");
            }
            catch (Exception error)
            {
                MessageBox.Show(this, "Error while trying to open your browser: " + error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                Process.Start("http://mscrmtools.blogspot.com");
            }
            catch (Exception error)
            {
                MessageBox.Show(this, "Error while trying to open your browser: " + error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        #endregion
    }
}